package main

import (
	"context"
	"fmt"
	"goTestToMod/grpc/proto"
	"google.golang.org/grpc"
)

func main(){
	conn, err := grpc.Dial("127.0.0.1:8021", grpc.WithInsecure())
	if err != nil {
		panic(err)
	}

	defer conn.Close()

	c := proto.NewHelloClient(conn)
	res, err := c.Hello(context.Background(), &proto.HelloRequse{Name: "ice"})
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Reply)
}
